package maps

import "errors"

type Dictionary map[string]string

func Search(m map[string]string, s string) (string, error) {
	d, ok := m[s]
	if !ok {
		return "", errors.New("不存在")
	}
	return d, nil
}

func (d Dictionary) Delete(k string) {
	delete(d, k)
}
func (d Dictionary) Update(k, v string) {
	d[k] = v
}
func (d Dictionary) Add(k, v string) {
	d[k] = v
}
